package optimizer;

public enum Register {
	R0, R1,	R2,	R3,	R4,	R5,	R6,	R7,	R8;
	
	public static Register getRegister(String s) {
		if("R0".equalsIgnoreCase(s)) return R0;
		else if("R1".equalsIgnoreCase(s)) return R1;
		else if("R2".equalsIgnoreCase(s)) return R2;
		else if("R3".equalsIgnoreCase(s)) return R3;
		else if("R4".equalsIgnoreCase(s)) return R4;
		else if("R5".equalsIgnoreCase(s)) return R5;
		else if("R6".equalsIgnoreCase(s)) return R6;
		else if("R7".equalsIgnoreCase(s)) return R7;
		else if("R8".equalsIgnoreCase(s)) return R8;
		
		return null;
	}
}
